package com.unknowpupil.design.proxy.staticProxy;

/**
 * @Description: <p>
 *  代理人
 * </p>
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/4/27 16:59
 * @Classname: ProxyNewStar
 * @Version: 1.0
 */
public class ProxyStar implements Star{


    /**
     * 代理类需要知道代理的对象。
     */
    private Star newStar;

    public ProxyStar(Star newStar) {
        this.newStar = newStar;
    }

    @Override
    public void confer() {
        System.out.println("ProxyStar.confer");
    }

    @Override
    public void signContract() {
        System.out.println("ProxyStar.signContract");
    }

    @Override
    public void bookTicket() {
        System.out.println("ProxyStar.bookTicket");
    }

    @Override
    public void sing() {
        newStar.sing();
    }

    @Override
    public void collectMoney() {
        System.out.println("ProxyStar.collectMoney");
    }
}
